package com.ming.easyDevelop.mappers;

import com.ming.easyDevelop.mappers.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
/**
 * @Description  Mapper接口
 * @Author ming
 * @Date 2024/07/10
 */
@Mapper
public interface ProductsMapper<T,P> extends BaseMapper {
	/**
	 * 根据ProductID查询
	 */
	T selectByProductID(@Param("productID") Integer productID);
	/**
	 * 根据ProductID更新
	 */
	Long updateByProductID(@Param("bean") T t, @Param("productID") Integer productID);
	/**
	 * 根据ProductID删除
	 */
	Long deleteByProductID(@Param("productID") Integer productID);
	/**
	 * 根据ProductNameAndCategoryID查询
	 */
	T selectByProductNameAndCategoryID(@Param("productName") String productName, @Param("categoryID") Integer categoryID);
	/**
	 * 根据ProductNameAndCategoryID更新
	 */
	Long updateByProductNameAndCategoryID(@Param("bean") T t, @Param("productName") String productName, @Param("categoryID") Integer categoryID);
	/**
	 * 根据ProductNameAndCategoryID删除
	 */
	Long deleteByProductNameAndCategoryID(@Param("productName") String productName, @Param("categoryID") Integer categoryID);
}